package com.glela.platform.util;

/**
 * 
 */
public class ParameterUtils
{
	/**
	 * 判断传入的参数值是否有空值
	 * 
	 * @param objects
	 * @return boolean ture：是，flase：否
	 */
	public static boolean validParams(Object... objects)
	{
		for (Object obj : objects) {
			if (null == obj) {
				return true;
			}
			if (obj instanceof Integer) {
				if (0 == (Integer) obj) {
					return true;
				}
			}
			else if (obj instanceof Long) {
				if (0 == (Long) obj) {
					return true;
				}
			}
			else if (obj instanceof Double) {
				if (0 == (Double) obj) {
					return true;
				}
			}
			else if (obj instanceof Float) {
				if (0 == (Float) obj) {
					return true;
				}
			}
			else if ("".equals(obj)) {
				return true;
			}
		}
		return false;
	}
	
	public static void main(String[] args) {
		System.out.println(validParams(0));
	}
}
